package com.ncsc.erp.model;
// Generated 20 มิ.ย. 2557, 12:55:43 by Hibernate Tools 3.4.0.CR1


import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * ScVoteFriendGroup generated by hbm2java
 */
@Entity
@Table(name="sc_vote_friend_group"
    ,catalog="ncsc_erp"
)
public class ScVoteFriendGroup  implements java.io.Serializable {


     private long friendGroupNo;
     private SdCustUserAccount sdCustUserAccount;
     private String friendGroupName;
     private short friendGroupStatusNo;
     private Date friendGroupCreatedDtm;
     private Set<ScVoteFriendGroupMember> scVoteFriendGroupMembers = new HashSet<ScVoteFriendGroupMember>(0);

    public ScVoteFriendGroup() {
    }

	
    public ScVoteFriendGroup(long friendGroupNo, String friendGroupName, short friendGroupStatusNo) {
        this.friendGroupNo = friendGroupNo;
        this.friendGroupName = friendGroupName;
        this.friendGroupStatusNo = friendGroupStatusNo;
    }
    public ScVoteFriendGroup(long friendGroupNo, SdCustUserAccount sdCustUserAccount, String friendGroupName, short friendGroupStatusNo, Date friendGroupCreatedDtm, Set<ScVoteFriendGroupMember> scVoteFriendGroupMembers) {
       this.friendGroupNo = friendGroupNo;
       this.sdCustUserAccount = sdCustUserAccount;
       this.friendGroupName = friendGroupName;
       this.friendGroupStatusNo = friendGroupStatusNo;
       this.friendGroupCreatedDtm = friendGroupCreatedDtm;
       this.scVoteFriendGroupMembers = scVoteFriendGroupMembers;
    }
   
     @Id 

    
    @Column(name="FRIEND_GROUP_NO", unique=true, nullable=false)
    public long getFriendGroupNo() {
        return this.friendGroupNo;
    }
    
    public void setFriendGroupNo(long friendGroupNo) {
        this.friendGroupNo = friendGroupNo;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="FRIEND_GROUP_CREATED_BY_CUST_USER_NO")
    public SdCustUserAccount getSdCustUserAccount() {
        return this.sdCustUserAccount;
    }
    
    public void setSdCustUserAccount(SdCustUserAccount sdCustUserAccount) {
        this.sdCustUserAccount = sdCustUserAccount;
    }

    
    @Column(name="FRIEND_GROUP_NAME", nullable=false, length=300)
    public String getFriendGroupName() {
        return this.friendGroupName;
    }
    
    public void setFriendGroupName(String friendGroupName) {
        this.friendGroupName = friendGroupName;
    }

    
    @Column(name="FRIEND_GROUP_STATUS_NO", nullable=false)
    public short getFriendGroupStatusNo() {
        return this.friendGroupStatusNo;
    }
    
    public void setFriendGroupStatusNo(short friendGroupStatusNo) {
        this.friendGroupStatusNo = friendGroupStatusNo;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="FRIEND_GROUP_CREATED_DTM", length=19)
    public Date getFriendGroupCreatedDtm() {
        return this.friendGroupCreatedDtm;
    }
    
    public void setFriendGroupCreatedDtm(Date friendGroupCreatedDtm) {
        this.friendGroupCreatedDtm = friendGroupCreatedDtm;
    }

@OneToMany(fetch=FetchType.LAZY, mappedBy="scVoteFriendGroup")
    public Set<ScVoteFriendGroupMember> getScVoteFriendGroupMembers() {
        return this.scVoteFriendGroupMembers;
    }
    
    public void setScVoteFriendGroupMembers(Set<ScVoteFriendGroupMember> scVoteFriendGroupMembers) {
        this.scVoteFriendGroupMembers = scVoteFriendGroupMembers;
    }




}


